package com.xsz.pda.data.bean

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity
data class CheckRecord(
    @PrimaryKey val id: String,
    @ColumnInfo(name = "ticketItemId") val ticketItemId: String,
    @ColumnInfo(name = "checkTime") val checkTime: String,
    @ColumnInfo(name = "type") val type: String,
    @ColumnInfo(name = "status") var status: Int,
    @ColumnInfo(name = "androidId") val androidId: String,
    @ColumnInfo(name = "deviceName") val deviceName: String,
    @ColumnInfo(name = "groupId") val groupId: String,
    @ColumnInfo(name = "timestamp") var timestamp: Long, // 最近更新时间
    @ColumnInfo(name = "firstCheck") val firstCheck: String,
){
    companion object{
//        1非人脸2票加人脸3纯人脸
        const val TYPE_NO_FACE = "1"
        const val TYPE_TICKETFACE = "2"
        const val TYPE_FACE = "3"

    }

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false
        other as CheckRecord
        if (id != other.id) return false

        return true
    }

    override fun hashCode(): Int {
        return id.hashCode()
    }
}